{% block sw_users_permissions %}
<sw-page class="sw-users-permissions">
    {% block sw_users_permissions_smart_bar_header %}
    <template #smart-bar-header>
        <h2>
            {% block sw_users_permissions_smart_bar_header_title_text %}
            {{ $tc('sw-settings.index.title') }}
            <mt-icon
                name="regular-chevron-right-xs"
                size="12px"
            />
            {{ $tc('sw-users-permissions.general.label') }}
            {% endblock %}
        </h2>
    </template>
    {% endblock %}

    {% block sw_users_permissions_smart_bar_actions %}
    <template #smart-bar-actions>
        <sw-button-process
            variant="primary"
            :is-loading="isLoading"
            :process-success="isSaveSuccessful"
            :disabled="!acl.can('users_and_permissions.editor')"
            @click="onSave"
            @update:process-success="onSaveFinish"
        >
            {{ $tc('global.default.save') }}
        </sw-button-process>
    </template>
    {% endblock %}

    {% block sw_users_permissions_content %}
    <template #content>
        <sw-card-view>
            {% block sw_users_permissions_content_user_list %}
            <sw-users-permissions-user-listing
                ref="userListing"
            />
            <sw-users-permissions-role-listing
                ref="roleListing"
                @get-list="reloadUserListing"
            />
            <sw-users-permissions-configuration
                ref="configuration"
                @loading-change="onChangeLoading"
            />
            {% endblock %}
        </sw-card-view>
    </template>
    {% endblock %}
</sw-page>
{% endblock %}
